<template>
  <div class="setting-wechat">
    <el-tabs v-model="tabActiveName">
      <el-tab-pane label="财务设置" name="finance">
        <finance-form :setting="setting.finance"></finance-form>
      </el-tab-pane>
      <el-tab-pane label="收益设置" name="gain">
        <gain-form :setting="setting.gain"></gain-form>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import FinanceForm from './components/finance'
import GainForm from './components/gain'
export default {
  name: 'SettingFinance',
  components: {
    FinanceForm,
    GainForm
  },
  data() {
    return {
      tabActiveName: 'finance',
      setting: {}
    }
  },
  mounted() {
    this.getSetting()
  },
  methods: {
    getSetting() {
      this.$get('setting')
        .then((res) => {
          this.setting = res.data.data
        })
    }
  }
}
</script>
